﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Util.Helper
{
    public static class BMIUtil
    {
        /// <summary>
        /// 当小于18.5的时候就说明偏瘦,
        /// 18.5到23.9是属于正常的,
        /// 超过28就是过于肥胖.
        /// </summary>
        /// <param name="height">身高(m)</param>
        /// <param name="weight">体重(kg)</param>
        /// <returns></returns>
        public static double GetBMI(double height, double weight)
        {
            var a = weight/(height * height);
            var bmivalue = Math.Round(a,2);

            return bmivalue;
        }


    }
}
